RENUM

Syntax: RENUM [start_line [TO end_line];][new_line][,step]
    or: RENUM [start_line] TO [end_line][;new_line][,step]
Location: QL ROM

This command allows you to RENUMber a program.  The simplest form is:

RENUM

This will renumber the whole of the SuperBASIC program in memory, so that the first line number becomes line 100 and every subsequent SuperBASIC line number will be in an increment of 10.

You can however also use RENUM to renumber a specified range of lines in a program, by using some of the optional parameters. These parameters have the following effects:

start_line
specifies the first line to be RENUMbered (default 1).

end_line
specifies the last line in the range to be RENUMbered (default 32767).

new_line
the line number which the start_line will be RENUMbered to (default 100).

step
specifies the gap between each new line number (default 10).

RENUM will also alter line numbers referred to in the standard QL ROM commands: 

GO SUB
GO TO
RESTORE 

It is also possible that a reference to a line number is actually calculated when the interpreter reaches that line. In such instances, the line number reference can only be renumbered if it is the first thing in the expression. 

Example:
RENUM 100 
RENUM 100 TO 1000;10,5
RENUM 1000,20

Cross-Reference:
DLINE allows you to delete lines from a program.
ED allows you to edit a program in memory.
Also see AUTO.
